<template>
	<view class="integralRecord-wrapper wrapperLayer">
		<view class="recordList-container colCen">
			<block v-for="(items,index) in List" :key="index">
				<view class="items-container rowCenBet">
					<view class="record-details">
						<view class="record-title">
							{{items.goodsName}}  <span class="statusTxt" :style="items.status==2?'color:#15D36A;':'color:#FC011A;'">{{items.status==1?'审核中':items.status==2?'兑换成功':'兑换失败'}}</span>
						</view>
						<view class="record-time">
							{{items.createTime}}
						</view>
					</view>
					
					<!-- 西瓜猪淘客全网首发私有化部署,数据放在自己手里，参考：https://www.xiguazhu.net/
					QQ群:458190194    QQ212156620    微信 jiuge8631
					更多CPS小程序请关注QQ群
					 -->
					 
					 

					<view class="right-num-content colCen">
						{{items.type==1?'+':'-'}} {{items.riceBall}}米团
					</view>
				</view>
			</block>
		</view>
		
		<aLoadMore :status="loadstate" mode="loading3" :showTitle='true' color="#999999"></aLoadMore>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				List:[],
				loadstate: 'nomore',
				pageNum: 0,
				canload: false,
			}
		},
		onLoad() {
			this.getList()
		},
		onPullDownRefresh() {
			this.getList()
		},
		methods:{
			getList(){
				// <!-- 西瓜猪淘客全网首发私有化部署,数据放在自己手里，参考：https://www.xiguazhu.net/
	// QQ群:458190194    QQ212156620    微信 jiuge8631
	// 更多CPS小程序请关注QQ群
	
				this.$http.post('exchangeRecord/list').then(res=>{
					console.log(res);
					uni.stopPullDownRefresh()
					this.List = res.data
				})
			}
		}
	}
</script>

<style lang="scss">
	.integralRecord-wrapper {
		width: 100%;
		
		.recordList-container{
			width: 100%;
			background-color: #FFFFFF;
			.items-container{
				width: 100%;
				height: 134rpx;
				padding: 0 30rpx;
				border-bottom: 1rpx solid #F1F1F1;
				.record-details{
					.record-title{
						font-size: 26rpx;
						font-weight: 500;
						color: #333333;
						
						.statusTxt{
							margin-left: 20rpx;
						}
					}
					.record-time{
						font-size: 22rpx;
						font-weight: 500;
						color: #666666;
						margin-top: 25rpx;
					}
				}
				.right-num-content{
					.numbox{
						font-size: 36rpx;
						font-weight: bold;
						color: #333333;
					}
					.state{
						font-size: 24rpx;
						font-weight: 500;
					}
				}
			}
		}
	}
</style>
